<template>
  <div class="container">
   
    <el-pagination
      @size-change="handleSizeChange"
      @current-change="handleCurrentChange"
      :current-page="currentPage4"
      :page-sizes="[100, 200, 300, 400]"
      :page-size="100"
      layout="total, sizes, prev, pager, next, jumper"
      :total="total"
    >
    </el-pagination>
  </div>
</template>

<script>
export default {
  props: ["total"],
  data() {
    return {
      currentPage4: 1,
    };
  },
  methods: {
    handleSizeChange(val) {
      console.log(`每页 ${val} 条`);
      this.$parent.pagesize = val;
      this.$bus.$emit("changePageSize");
    },
    handleCurrentChange(val) {
      console.log(`当前页: ${val}`);
      this.$parent.page = val;
      this.$bus.$emit("changePage");
    },
    chackAll(){
      this.$bus.$emit('chackAll')
    }
  },
};
</script>

<style lang="less" scoped>
.container {
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
 
}
</style>